import request from '@/utils/request'

export function getUnitList(data) {
  return request({
    url: '/unit/find-all-unit',
    method: 'post',
    data
  })
}

export function deleteUnit(sid) {
  return request({
    url: '/unit/delete-unit',
    method: 'post',
    params: { sid }
  })
}

export function addUnit(data) {
  return request({
    url: '/unit/add-unit',
    method: 'post',
    data
  })
}

export function updateUnit(data) {
  return request({
    url: '/unit/update-unit',
    method: 'post',
    data
  })
}

